<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


    <title>H+ 后台主题UI框架 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台"/>
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术"/>

    <link rel="shortcut icon" href="favicon.ico"/> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet"/>

    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet"/>

    <link href="css/animate.css" rel="stylesheet"/>
    <link href="css/style.css?v=4.1.0" rel="stylesheet"/>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>基本 <small>分类，查找</small></h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="wl_order_refund.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li><a href="wl_order_refund.html#">选项1</a>
                            </li>
                            <li><a href="wl_order_refund.html#">选项2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="wl_order_refund_getWeixinfuzzQuery" method="post">
                        <table>
                            <tr>
                                <td><input id="shopname" class="form-control" type="text" placeholder="请输入退货单编号" name="tuihuoId"/></td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                <td><input id="begin" type="date" class="form-control" placeholder="请输入开始时间" name="beginTime"/></td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                <td><input id="end" type="date" class="form-control" placeholder="请输入截至时间" name="endTime"/></td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                <td> <button type="submit" class="btn btn-default">查询</button></td>
                            </tr>
                                <tr><td>&nbsp;</td></tr>
                            <tr>
                                <td><button type="button" onclick="deleteBatch()" class="btn btn-default">批量退款</button></td>
                            </tr>
                        </table>
                    </form>
                    <div  class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                            <tr>
                                <th>选择</th>
                                <th>退货单号</th>
                                <th>订单编号</th>
                                <th>退货数量</th>
                                <th style="width: 100px">退货描述</th>
                                <th>退货申请图片</th>
                                <th>应退金额</th>
                                <th>实退金额</th>
                                <th>申请时间</th>
                                <th>退货状态</th>
                                <th>退款状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="user:${getWeixinAllList}" class="gradeX">
                                <td><input id="check" type="checkbox" th:value="${user.id}" name="refundid"/></td>
                                <td th:text="${user.refundorderno}"></td>
                                <td th:text="${user.orderno}"></td>
                                <td th:text="${user.refundcount}"></td>
                                <td th:text="${user.refunddescription}"></td>
                                <td th:text="${user.refundimages}"></td>
                                <td th:text="${user.refundmoney}"></td>
                                <td th:text="${user.paymoney}"></td>
                                <td th:text="${#dates.format(user.createtime,'yyyy-MM-dd')}"></td>
                                <td th:if="${user.status==0}" th:text="申请退货"></td>
                                <td th:if="${user.status==1}" th:text="退货成功"></td>
                                <td th:if="${user.status==2}" th:text="用户取消退货"></td>
                                <td th:if="${user.status==3}" th:text="管理员取消退货"></td>
                                <td th:if="${user.status==4}" th:text="管理员收到退货"></td>
                                <td  th:if="${user.refundmoneystatus==null}" th:text="null"></td>
                                <td  th:if="${user.refundmoneystatus==0}" th:text="未退款"></td>
                                <td  th:if="${user.refundmoneystatus==1}" th:text="退款成功"></td>
                                <td  th:if="${user.refundmoneystatus==2}" th:text="退款失败"></td>
                                <td>
                                    <!-- 退款 -->
                                    <a href="javascript:sumchexk()">
                                        <span class="glyphicon glyphicon-apple"></span>
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>



<script src="js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>


<!-- Page-Level Scripts -->
<script>
    function sumchexk(){
           var che=$("#check:checked").val();
        if($('#check').is(':checked')) {
            window.location.href='wl_order_refund_getUpdateRefundMoneyStatus?id=' + che;
        }
         else {
            alert('你还没有选择任何内容！');
        }

    }
    $(document).ready(function () {
        $('.dataTables-example').dataTable();

        /* Init DataTables */
        var oTable = $('#editable').dataTable();

        /* Apply the jEditable handlers to the table */
        oTable.$('td').editable('../example_ajax.php', {
            "callback": function (sValue, y) {
                var aPos = oTable.fnGetPosition(this);
                oTable.fnUpdate(sValue, aPos[0], aPos[1]);
            },
            "submitdata": function (value, settings) {
                return {
                    "row_id": this.parentNode.getAttribute('id'),
                    "column": oTable.fnGetPosition(this)[2]
                };
            },

            "width": "90%",
            "height": "100%"
        });


    });

    function fnClickAddRow() {
        $('#editable').dataTable().fnAddData([
            "Custom row",
            "New row",
            "New row",
            "New row",
            "New row"]);

    }

    function deleteBatch() {
        var flag = true;
        var obj = document.getElementsByName('refundid');
        var s = '';
        for (var i = 0; i < obj.length; i++) {
            if (obj[i].checked) s += obj[i].value + ',';
        }
        if (s == '') {
            alert('你还没有选择任何内容！');
        } else {
            window.location.href = 'wl_order_refund_getUpdateRefundMoneyStatus?id=' + s;
        }
    }

     $(function() {
         $('input[type=checkbox]').click(function(){
             if($(this).is(':checked')){
                 $(this).attr('checked',true).siblings().attr('checked',false);
                 alert($(this).val());
             }else{
                 $(this).attr('checked',false).siblings().attr('checked',false);
             }
         })
     });


</script>

<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<!--统计代码，可删除-->

</body>

</html>
